<?php
/**
 * Created by JetBrains PhpStorm.
 * User: CuongDD5
 * Date: 5/8/13
 * Time: 12:20 PM
 * To change this template use File | Settings | File Templates.
 */
include 'mySQLConnect.php';
$username = $_POST['username'];
$password = $_POST['password'];

$qry1 = "SELECT * FROM account WHERE username = '$username' and password = '$password' ";

$result = mysql_query($qry1);

if (mysql_num_rows($result) == 0) {
    echo "fail";
} else {
    echo "success";
    session_start();
    $_SESSION['success'] = true;
}

include 'mySQLClose.php';

?>
